package com.liner.enums;

public enum ResponseEnum {
    // 成功
    SUCCESS(200, "操作成功"),
    // 登录
    NEED_LOGIN(401, "需要登录后操作"),
    MOBILE_ERROR(402, "手机号格式错误"),
    MOBILE_EXIST(403, "手机号已注册"),
    MOBILE_IS_NULL(404, "手机号未注册"),
    PASSWORD_ERROR(405, "密码错误"),
    TOKEN_ERROR(406, "token失效"),
    SMS_SEND_ERROR(407, "短信发送失败"),
    SMS_CODE_ERROR(408, "验证码错误"),
    USERNAME_IS_NULL(409, "用户名不存在"),

    NO_OPERATOR_AUTH(411, "无权限操作"),


    SYSTEM_ERROR(500, "出现错误"),
    STOCK_ERROR(501, "库存不足"),
    LOGIN_ERROR(505, "用户名或密码错误"),
    CONTENT_NOT_NULL(506, "评论内容不能为空"),
    FILE_TYPE_ERROR(507, "文件类型错误，请上传png文件");

    int code;
    String msg;

    ResponseEnum(int code, String errorMessage) {
        this.code = code;
        this.msg = errorMessage;
    }

    public int getCode() {
        return code;
    }

    public String getMsg() {
        return msg;
    }
}

